<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>冰锐</title>
</head>
<body>
  <button onclick="alert('html');">这是Html按钮</button>
  <button id="jsButton" onclick="addLi()">这是JS按钮，点击会添加一个li</button>
  <div id="mydiv"></div>
  <script>
    function addLi() {
      var a = '这是中文';
      var b = 10.24;
      document.getElementById('mydiv').innerHTML = "<li onclick=\"handleLi('" + a + "', "+ b +")\">这是被JS添加的li</li>";
    }
    function handleLi(a, b) {
      alert('string参数a=' + a + ', number参数b=' + b);
    }
  </script>
</body>
</html>
